/**
 * @projectName study-note
 * @package Singleton
 * @className Singleton.Singleton01
 */
package Singleton;

/**
 * Singleton01
 * @description 单例模式--饿汉式
 * 优点：JVM保证线程安全
 * 缺点：类加载时，没被调用就进行实例化
 * @author answer_wx
 * @date 2022/7/4 14:35
 * @version 1.0
 */
public class Singleton01 {
    private static final Singleton01 INSTANCE = new Singleton01();

    private Singleton01() {
    }

    public static Singleton01 getInstance() {
        return INSTANCE;
    }
}